package logic

import (
	"context"
	fitness "fitness/common/proto"
	"fitness/service/server"
)

type ServerFitness struct {
	fitness.UnimplementedFitnessServer
}

func (s ServerFitness) AddReservation(ctx context.Context, in *fitness.AddReservationReq) (*fitness.AddReservationResp, error) {
	fitmess, err := server.AddReservation(in)
	if err != nil {
		return nil, err
	}
	return fitmess, nil

}
func (s ServerFitness) UserLogin(ctx context.Context, in *fitness.UserLoginReq) (*fitness.UserLoginResp, error) {
	login, err := server.UserLogin(in)
	if err != nil {
		return nil, err
	}
	return login, nil
}

func (s ServerFitness) FitnessList(ctx context.Context, in *fitness.FitnessListReq) (*fitness.FitnessListResp, error) {
	list, err := server.FitnessList(in)
	if err != nil {
		return nil, err
	}
	return list, nil
}
func (s ServerFitness) ReservationList(ctx context.Context, in *fitness.ReservationListReq) (*fitness.ReservationListResp, error) {
	list, err := server.ReservationList(in)
	if err != nil {
		return nil, err
	}
	return list, nil
}
func (s ServerFitness) FindUserReservation(ctx context.Context, in *fitness.FindUserReservationReq) (*fitness.FindUserReservationResp, error) {
	reservation, err := server.FindUserReservation(in)
	if err != nil {
		return nil, err
	}
	return reservation, nil
}
